From f0a564969477254f713d282c742d0f987af00978 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 9 Feb 2006 15:57:52 +0100 Subject: [PATCH] Remove xennull_con. Use dummy_con. Signed-off-by: Keir Fraser --- .../arch/i386/kernel/setup-xen.c | 5 ++- .../arch/x86_64/kernel/setup-xen.c | 41 ++++++++++--------- .../drivers/xen/console/console.c | 39 ------------------ 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c index ea04ad7029..ce2acff5a1 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c @@ -1865,13 +1865,14 @@ void __init setup_arch(char **cmdline_p) #endif #endif } else { - extern const struct consw xennull_con; extern int console_use_vt; #if defined(CONFIG_VGA_CONSOLE) /* disable VGA driver */ ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB; #endif - conswitchp = &xennull_con; +#if defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; +#endif console_use_vt = 0; } } diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c index 37f63dab70..3f9ea69ce3 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c @@ -940,36 +940,37 @@ void __init setup_arch(char **cmdline_p) #endif #ifdef CONFIG_XEN - { - physdev_op_t op; + { + physdev_op_t op; - op.cmd = PHYSDEVOP_SET_IOPL; - op.u.set_iopl.iopl = 1; - HYPERVISOR_physdev_op(&op); + op.cmd = PHYSDEVOP_SET_IOPL; + op.u.set_iopl.iopl = 1; + HYPERVISOR_physdev_op(&op); - if (xen_start_info->flags & SIF_INITDOMAIN) { - if (!(xen_start_info->flags & SIF_PRIVILEGED)) - panic("Xen granted us console access " - "but not privileged status"); + if (xen_start_info->flags & SIF_INITDOMAIN) { + if (!(xen_start_info->flags & SIF_PRIVILEGED)) + panic("Xen granted us console access " + "but not privileged status"); #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) - conswitchp = &vga_con; + conswitchp = &vga_con; #elif defined(CONFIG_DUMMY_CONSOLE) - conswitchp = &dummy_con; + conswitchp = &dummy_con; #endif #endif - } else { - extern const struct consw xennull_con; - extern int console_use_vt; + } else { + extern int console_use_vt; #if defined(CONFIG_VGA_CONSOLE) - /* disable VGA driver */ - ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB; + /* disable VGA driver */ + ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB; +#endif +#if defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; #endif - conswitchp = &xennull_con; - console_use_vt = 0; - } - } + console_use_vt = 0; + } + } #else /* CONFIG_XEN */ #ifdef CONFIG_VT diff --git a/linux-2.6-xen-sparse/drivers/xen/console/console.c b/linux-2.6-xen-sparse/drivers/xen/console/console.c index 5523e25edf..bf43f68cd4 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c @@ -562,45 +562,6 @@ static struct tty_operations xencons_ops = { .wait_until_sent = xencons_wait_until_sent, }; -static const char *xennullcon_startup(void) -{ - return NULL; -} - -static int xennullcon_dummy(void) -{ - return 0; -} - -#define DUMMY (void *)xennullcon_dummy - -/* - * The console `switch' structure for the dummy console - * - * Most of the operations are dummies. - */ - -const struct consw xennull_con = { - .owner = THIS_MODULE, - .con_startup = xennullcon_startup, - .con_init = DUMMY, - .con_deinit = DUMMY, - .con_clear = DUMMY, - .con_putc = DUMMY, - .con_putcs = DUMMY, - .con_cursor = DUMMY, - .con_scroll = DUMMY, - .con_bmove = DUMMY, - .con_switch = DUMMY, - .con_blank = DUMMY, - .con_font_set = DUMMY, - .con_font_get = DUMMY, - .con_font_default = DUMMY, - .con_font_copy = DUMMY, - .con_set_palette = DUMMY, - .con_scrolldelta = DUMMY, -}; - static int __init xencons_init(void) { int rc; -- 2.30.2